package com.tiancheng.trade.merchant.channel;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Optional;

/**
 * @Author: kellen
 * @Description: 证件照片枚举
 * @Date: create in 2024/11/19 15:39
 */
@Getter
@AllArgsConstructor
public enum IdPhotoEnums {
    fr_sfz("0001","法人身份证",""),
    fr_sfz_fm("0011","身份证反面",""),
    sh_yyzz("0002","商户营业执照","个人商户或企业商户必传，小微及机关事业单位或社会团体选传"),
    sh_swdjz("0003","商户税务登记证",""),
    zzjgdm("0004","组织机构代码证","机关事业单位或社会团体0002和0004必传其一"),
    mtzp("0005","门头照片",""),
    khxkz("0006","开户许可证","企业商户必传"),
    zcsfz("0007","手持身份证自拍照",""),
    fzzmcl("0008","辅助证明材料","辅助证明材料（本编码支持传输8张图片）"),
    fzzmcl1("0013","辅助证明材料1",""),
    zlxy("0016","租赁协议",""),
    cqzm("0017","产权证明",""),
    yezzzz("0018","执业资质证照",""),
    dsfzm("0019","第三方证明",""),
    qtxwshzmcl("0020","其他小微商户证明材料",""),
    jysp("0021","经营商品",""),
    snzp("0022","室内照片",""),
    qtcl("0099","其他材料",""),
    yhk_zmz("0025","银行卡正面照","(账户类型为个人账户，必须上传银行卡正面照和背面照)"),
    yhk_bmz("0026","银行卡背面照","(账户类型为个人账户，必须上传银行卡正面照和背面照)"),
    mbfdjzs("0032","民办非登记证书",""),
    wzapp("0034","网站或APP截图","网络商户必传"),
    yhkh_hz("0050","银行（开户）回执","银行（开户）回执");

    private final String code;
    private final String name;
    private final String desc;

    public static Optional<IdPhotoEnums> getByCode(String code){
        return Arrays.stream(IdPhotoEnums.values()).filter(e->e.getCode().equals(code)).findFirst();
    }
}
